home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / biblio / bibtex / utils / bibtools / printbib (.txt) < prev    next >
LaTeX Document  |  1992-09-03  |  1KB  |  52 lines

  1. #!/bin/csh -f
  2. # printbib - print a full bibtex bib file out
  3. # David Kotz
  4. # usage:
  5. #  printbib bibfile...
  6. # Then send the dvi file 'abstract.dvi' to the printer
  7. # (usage varies; try lpr -d abstract.dvi)
  8. if ($#argv == 0) then
  9.        echo usage: printbib bibfile...
  10.        exit 1
  11. endif
  12. if ($1:e == "bib") then
  13.        set files=($1:r)
  14.        set files=($1)
  15. endif
  16. shift
  17. foreach f ($*)
  18.        if ($f:e == "bib") then
  19.               set files="$files,$f:r"
  20.        else
  21.               set files="$files,$f"
  22.        endif
  23. echo creating abstract.tex for $files
  24. cat > abstract.tex <<EOF
  25. \documentstyle[11pt]{article}
  26. \sloppy
  27. \setlength{\textwidth}{6.5in}
  28. \setlength{\textheight}{9in}
  29. \setlength{\topmargin}{-0.5in}
  30. \setlength{\oddsidemargin}{0pt}
  31. \setlength{\evensidemargin}{0pt}
  32. \newcommand{\eg}{e.g.}        % e.g.
  33. \newcommand{\ie}{i.e.}        % i.e.
  34. \newcommand{\etc}{etc.}        % etc.
  35. \newcommand{\vs}{{\em vs.}}        % vs.
  36. \begin{document}
  37. \begin{center} \Large Bibliography files \large \\\\
  38. echo $files >> abstract.tex
  39. cat >> abstract.tex <<EOF
  40. \\\\ \today
  41. \end{center}
  42. \nocite{*}
  43. \bibliographystyle{abstract}
  44. echo "\bibliography{$files}" >> abstract.tex
  45. echo '\end{document}' >> abstract.tex
  46. rm -f abstract.{aux,log,dvi,bbl,blg}
  47. set echo 
  48. latex abstract.tex
  49. bibtex abstract
  50. latex abstract.tex
  51. latex abstract.tex
  52.